package cn.edu.swu.basic;

public class Main {
    public static void main(String[] args) {
        //创建对象
        Student student1 = new Student("S2024001","张三","男",18);
        Student student2 = new Student("S2024002","李四","女",19);

        Course course1 = new Course("C001","JavaWeb应用开发","刘老师");
        Course course2 = new Course("C002","数据库原理","张老师");

        //操作对象（修改信息）
        student1.setAge(20);
        course2.setTeacher("王老师");

        //展示信息（调用showInfo()方法）
        System.out.println("--- 学生信息 ---");
        student1.showInfo();
        System.out.println("---------------");
        student2.showInfo();
        System.out.println("---------------");

        System.out.println("--- 课程信息 ---");
        course1.showInfo();
        System.out.println("---------------");
        course2.showInfo();
        System.out.println("---------------");
    }
}
